package com.ai.web.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ai.web.service.AppPushLogService;
import com.ai.web.vo.AppPushLogV;
import com.ai.web.vo.ResultModel;
import com.tiny.persistence.domain.AppPushLog;
import com.tiny.persistence.repository.AppPushLogRepo;
/**
 *
* @ClassName:  
* @Description: TODO 
* @author:  
* @date: 2014年3月28日
*
 */
@Service("appPushLogService")
public class AppPushLogServiceImpl extends BaseServiceImpl<AppPushLog, Integer, AppPushLogV> implements AppPushLogService  {

	@Autowired
	private AppPushLogRepo appPushLogRepo;
	
	@Autowired
	public AppPushLogServiceImpl(AppPushLogRepo appUserRepo) {
		super(appUserRepo);
	}

	public AppPushLogV getAppPushLog(int userId) throws Exception {
		return getT(userId);
	}

	public ResultModel saveAppPushLog(AppPushLogV appPushLogV) throws Exception {
		
		AppPushLogV saveV = saveT(appPushLogV);
		
		ResultModel rm = new ResultModel();
		rm.setData(saveV);
		rm.setSuccessCode();
		
		return rm;
	}

	public ResultModel deleteAppPushLogs(List<Integer> userIds) throws Exception {
		deleteTs(userIds);
		
		ResultModel rm = new ResultModel();
		rm.setSuccessCode();
		rm.setMsg("删除成功！");
		
		return rm;
	}

}
